﻿using HuiLian.Cloud.ViewModel;
using HuiLian.Cloud.View;
using HuiLian.Cloud.ViewModel.Base;
using HuiLian.Model.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows.Input;

namespace HuiLian.Cloud.ViewModel
{
    public class OrdersWindowViewModel : ViewModelBase
    {
        private List<Order> orders = new List<Order>()
        {
            new Order(){ Id="YW202005030933590778075", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="发货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778076", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="发货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778077", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="发货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778078", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已发货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778079", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已发货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778075", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已发货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778076", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已取货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778077", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已取货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778078", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已取货", Username = "散客", Telphone="13874945810" },
            new Order(){ Id="YW202005030933590778079", CreateTime="2020-05-03 09:33:59",OrderMoney=13.5,
                ActualModey=12.5, OrderStatus="已支付", SendStatus="已发货", Username = "散客", Telphone="13874945810" }
        };

        public List<Order> Orders { get { return orders; } set { orders = value; OnPropertyChanged("Orders"); } }

        #region
        public ICommand OnDepayClickCommand => new DelegateCommand((sender) =>
        {
            ConfirmWindow confirmWindow = new ConfirmWindow();
            confirmWindow.ShowDialog();
        });

        public ICommand OnItemClickCommand => new DelegateCommand((sender) =>
        {
            OrderItemWindow itemWindow = new OrderItemWindow();
            itemWindow.ShowDialog();
        });
        #endregion
    }
}
